@namespace BulmaRazor.Components
@inherits BulmaComponentBase


<input id="@id" @attributes="Attributes" class="@classes" type="checkbox" checked="@Checked" @onchange="ChangeHandle"/>
<label for="@id">
    @if (Checked)
    {
        if (OnSlot != null)
        {
            @:@OnSlot 
        }
        else if (OnLabel.HasValue())
        {
            @:@OnLabel
        }
        else if (ChildContent != null)
        {
            @:@ChildContent
        }
        else
        {
            @:@Label
        }
    }
    else
    {
        if (OffSlot != null)
        {
            @:@OffSlot 
        }
        else if (OffLabel.HasValue())
        {
            @:@OffLabel
        }
        else if (ChildContent != null)
        {
            @:@ChildContent 
        }
        else
        {
            @:@Label
        }
    }
</label>